<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1,shrink-to-fit=no">
    <title>用户登录界面</title>
    <link th:href="@{/source/css/bootstrap.min.css}"  href="../source/css/bootstrap.min.css" rel="stylesheet">
    <link th:href="@{/source/css/signin.css}" href="../source/css/signin.css" rel="stylesheet">
</head>
<body class="text-center">
<!--  用户登录form表单 -->
<form method="post" th:action="@{/user/doLogin}"  class="form-signin">
    <img class="mb-4" th:src="@{/source/img/login.jpg}" src="../source/img/login.jpg" width="72" height="72">
    <h1 class="h3 mb-3 font-weight-normal">请登录</h1>
    <!-- 用户登录错误信息提示框 -->
    <div th:if="${param.error}"
         style="color: red;height: 40px;text-align: left;font-size: 1.1em">
        <img th:src="@{/source/img/loginError.jpg}" src="../source/img/loginError.jpg" width="20px">用户名或密码错误，请重新登录！
    </div>
    <input type="text" class="form-control" name="name"
           placeholder="用户名" required="" autofocus="">
    <input type="password" class="form-control" name="password"
           placeholder="密码" required="">
    <div class="checkbox mb-3">
        <label>
            <input type="checkbox" name="rememberMe"> 记住我
        </label>
    </div>
    <button class="btn btn-lg btn-primary btn-block" type="submit">登录</button>
    <p>没有账号?点击注册<a th:href="@{/user/register}">新账号</a></p>
    <p><a th:href="@{/index}">首页</a></p>
    <p class="mt-5 mb-3 text-muted"> <span th:text="${#dates.year(#dates.createNow())}">2018</span>-<span th:text="${#dates.year(#dates.createNow())+1}">2019</span></p>
</form>
</body>
</html>
